﻿print('欢迎使用学生操作系统V1版本\n查询操作请按1\n插入操作请按2\n删除操作请按3\n修改操作请按4\n退出操作请输入over')
name = []
while True:
        direct = input('请输入您的指令:')
        if direct == '1':
                print(name)
                if len(name)==0:
                        print('暂无学生记录在案!!')
        elif direct == '2':
                direct_name = input('请输入要插入的学生姓名:')
                name.append(direct_name)
                print('插入操作成功!')
        elif direct == '3':
                direct_name = input('请输入要删除的学生姓名:')
                if direct_name not in name:
                        print('查无此人,请重新输入!!')
                        continue
                name.remove(direct_name)
                print('删除操作成功!')
        elif direct == '4':
                direct_name1 = input('请输入被更改的学生姓名:')
                if direct_name1 not in name:
                        print('查无此人,请重新输入!!')
                        continue
                direct_name2 = name.index(direct_name1)
                name.remove(direct_name1)
                direct_name4 = input('请输入要改的名:')
                name.insert(direct_name2,direct_name4)
                print('修改操作成功!')
        elif direct == 'over':
                print('操作结束!')
                break
        else:
                print('无此操作及指令,请根据提示!!!')
                
                       
                        

                


    
        





    
                








	

	
